package com.onLineCar.driver.config;


import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author The future is full of hope
 * @CreateTime 2023/12/23 0023 10:02
 * @PackageName:com.onLineCar.driver.config
 * @ClassName: RedissonConfig
 */


/**
 * Redisson配置
 */
@Configuration
public class RedissonConfig {

    @Bean
    public RedissonClient redissonClient() {
        Config config = new Config();
        config.useSingleServer()
                .setAddress("redis://117.72.16.38:6379");

        return Redisson.create(config);
    }

}
